//
//  CustomerUIButton.m
//  UI02_UILable_UITextField_UIImageView_UIButton
//
//  Created by aaaaaa on 16/6/6.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "CustomerUIButton.h"

@implementation CustomerUIButton

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/


+ (instancetype)buttonWithType:(UIButtonType)buttonType withFrame:(CGRect)frame{
    //使用父类UIButton的遍历构造器创建对象
    CustomerUIButton *button = [CustomerUIButton buttonWithType:buttonType];
    button.frame = frame;
//    button.titleLabel.text = @"sdfs";
    
    //设置正常状态下的标题
    [button setTitle:@"登录" forState:UIControlStateNormal];
    [button setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
    //设置高亮状态下的标题
    [button setTitle:@"高亮" forState:UIControlStateHighlighted];
    
    //在不同的状态下可以设置不同的标题和颜色
    return button;
}


@end
